import request from "@Utils/webServerRequest"
export const upimageToAiImage = (data) => {
    console.log('上传图片apisss')
    return request({
        url: `api/upload`,
        method: "post",
        baseUrl: "http://ai.doulingyang.cn/",
        paramete: {},
        data
    })
}
// 创建AI
export const createAi = (data) => {
    console.log('创建AI', data)
    return request({
        url: `api/img-auto-generate`,
        method: "post",
        baseUrl: "http://ai.doulingyang.cn/",
        paramete: {},
        data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 创建白底图
export const createWhiteAi = (data) => {
    console.log('创建白底图', data)
    return request({
        url: `api/img-matting`,
        method: "post",
        baseUrl: "http://ai.doulingyang.cn/",
        paramete: {},
        data: {
            ...data,
            leixing: 1
        },
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 获取结果
export const getResult = (data) => {
    console.log('获取结果', data)
    return request({
        url: `api/task-state`,
        method: "post",
        baseUrl: "http://ai.doulingyang.cn/",
        paramete: {},
        data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}